import { url } from '../../build/config'
import ajax from './ajax'


const base_url = url.base_url + '/api/qa-answer';

export function answernAdd(data) {
  return ajax({
    url: `${base_url}`,
    method: 'post',
    data: data,
    showMsg: true,
  })
}

export function answernUpdate(data) {
  return ajax({
    url: `${base_url}`,
    method: 'put',
    data: data,
    showMsg: true,
  })
}

export function answernDelete(key) {
  return ajax({
    url: `${base_url}/${key}`,
    method: 'delete',
    showMsg: true,
  })
}

export  function questionList(key) {
  return ajax({
    url: `${base_url}/${key}`,
    method: 'get',

  })
}
